package com.friend.entity.entity.base;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.RequiredArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author friend
 * @since 2019-10-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_circle")
@ApiModel(value="Circle对象", description="")
@RequiredArgsConstructor(staticName = "of")
public class Circle extends Model<Circle> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "圈头像")
    @TableField("pic")
    private String pic;

    @ApiModelProperty(value = "slogan")
    @TableField("slogan")
    private String slogan;

    @ApiModelProperty(value = "圈标题")
    @TableField("title")
    private String title;

    @ApiModelProperty(value = "圈地址")
    @TableField("address")
    private String address;

    @ApiModelProperty(value = "当前用户是否参加")
    @TableField(exist = false)
    private Integer joinFlag;

    @ApiModelProperty(value = "显示头")
    @TableField(exist = false)
    private String displayHead = "block";

    @ApiModelProperty(value = "显示尾")
    @TableField(exist = false)
    private String displayExit = "none";

    @ApiModelProperty(value = "参与者，用,隔开")
    @TableField("join_user")
    private String joinUser;

    @ApiModelProperty(value = "圈子类型：对应字典表主键为2的会员爱好")
    @TableField("type")
    private Integer type;

    @ApiModelProperty(value = "创建人")
    @TableField("create_user")
    private Integer createUser;

    @ApiModelProperty(value = "修改人")
    @TableField("update_user")
    private Integer updateUser;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "修改时间")
    @TableField("update_time")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "删除标识")
    @TableField("del_flag")
    @TableLogic
    private Integer delFlag;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
